package svc

import (
	"app-api/app/internal/config"
	"github.com/apache/pulsar-client-go/pulsar"
)

func initPulsar(c config.Config) pulsar.Client {
	client, err := pulsar.NewClient(pulsar.ClientOptions{
		URL: c.Pulsar.URL,
	})
	if err != nil {
		panic("Failed to create client: " + err.Error())
	}
	return client
}
